//
//  WBSecondNavigationBar.swift
//  Weibo
//
//  Created by 伏文东 on 2018/1/22.
//  Copyright © 2018年 伏文东. All rights reserved.
//

import UIKit

class WBSecondNavigationBar: UINavigationBar {

    override func layoutSubviews() {
        super.layoutSubviews()
        for subView in self.subviews {
            let stringFromClass = NSStringFromClass(subView.classForCoder)
            if stringFromClass.contains("BarBackground") {
                subView.frame = self.bounds
            } else if stringFromClass.contains("UINavigationBarContentView") {
                subView.frame = CGRect(x: 0, y: 20, width: UIScreen.cz_screenWidth(), height: 44)
            }
        }
    }
}
